// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_STORAGE_CHANGE
// * CreateDate    : 2011/8/16 10:16:40
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/16 10:16:40
// * LastChanger   : 2011/8/16 10:16:40
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class InvStorageChangeEntity : EntityBase
    {
        public InvStorageChangeTable TableSchema
        {
            get
            {
                return InvStorageChangeTable.Current;
            }
		}
		
		public InvStorageChangeEntity()
        {

        }
		
		public InvStorageChangeEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ChangeId = Convert.ToString(CommonFunctions.ToObject(dr["CHANGE_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.ChangeQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHANGE_QTY"]));
			this.ChangeUser = Convert.ToString(CommonFunctions.ToObject(dr["CHANGE_USER"]));
			this.ChangeTime = Convert.ToDateTime(CommonFunctions.ToObject(dr["CHANGE_TIME"]));
			this.RelatedOrder = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
            this.ChangeType = Convert.ToString(CommonFunctions.ToObject(dr["CHANGE_TYPE"]));

        }
		
		public InvStorageChangeEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ChangeId = Convert.ToString(CommonFunctions.ToObject(dr["CHANGE_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.ChangeQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHANGE_QTY"]));
			this.ChangeUser = Convert.ToString(CommonFunctions.ToObject(dr["CHANGE_USER"]));
			this.ChangeTime = Convert.ToDateTime(CommonFunctions.ToObject(dr["CHANGE_TIME"]));
			this.RelatedOrder = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
            this.ChangeType = Convert.ToString(CommonFunctions.ToObject(dr["CHANGE_TYPE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvStorageChangeTable.Current;
            }
        }
		
		#region Perporty List
        public string ChangeId
        {
            get { return Convert.ToString(GetData(InvStorageChangeTable.C_CHANGE_ID)); }
            set { SetData(InvStorageChangeTable.C_CHANGE_ID, value); }
        }
		
        public string ProductId
        {
            get { return Convert.ToString(GetData(InvStorageChangeTable.C_PRODUCT_ID)); }
            set { SetData(InvStorageChangeTable.C_PRODUCT_ID, value); }
        }
		
        public decimal ChangeQty
        {
            get { return Convert.ToDecimal(GetData(InvStorageChangeTable.C_CHANGE_QTY)); }
            set { SetData(InvStorageChangeTable.C_CHANGE_QTY, value); }
        }
		
        public string ChangeUser
        {
            get { return Convert.ToString(GetData(InvStorageChangeTable.C_CHANGE_USER)); }
            set { SetData(InvStorageChangeTable.C_CHANGE_USER, value); }
        }
		
        public DateTime ChangeTime
        {
            get { return Convert.ToDateTime(GetData(InvStorageChangeTable.C_CHANGE_TIME)); }
            set { SetData(InvStorageChangeTable.C_CHANGE_TIME, value); }
        }
		
        public string RelatedOrder
        {
            get { return Convert.ToString(GetData(InvStorageChangeTable.C_RELATED_ORDER)); }
            set { SetData(InvStorageChangeTable.C_RELATED_ORDER, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(InvStorageChangeTable.C_REMARK)); }
            set { SetData(InvStorageChangeTable.C_REMARK, value); }
        }
		
        public string LocationId
        {
            get { return Convert.ToString(GetData(InvStorageChangeTable.C_LOCATION_ID)); }
            set { SetData(InvStorageChangeTable.C_LOCATION_ID, value); }
        }
        public string ChangeType
        {
            get { return Convert.ToString(GetData(InvStorageChangeTable.C_CHANGE_TYPE)); }
            set { SetData(InvStorageChangeTable.C_CHANGE_TYPE, value); }
        }
		#endregion
	}
	
	
}	

